using ReflectionStudio.Core.Events;
using System;
using System.Collections.Generic;
using System.Data;
namespace WPFExcelReport
{
    public partial class VICC_GBMOV
    {        
      
        public void BATCHGBMOVCHG()
        {
            try
            {
                if (TBTemp == null)
                    return;
                string DD = INTEXDBC.GetDBDATE();
                foreach (DataRow _dwWB in TBMain.Rows)
                {
                    filter = "GABBELEG='" + _dwWB["GABBELEG"].ToString() + "' AND GABLFDNR ='" + _dwWB["GABLFDNR"].ToString() + "' ";
                    rows = TBTemp.Select(filter);
                    if (rows.Length == 0) continue;
                    if (rows[0]["ICCDAT"].ToString().Trim() + rows[0]["GABKG"].ToString().Trim() + rows[0]["GABKA"].ToString().Trim() + rows[0]["GABSP"].ToString().Trim()
                       != _dwWB["ICCDAT"].ToString().Trim() + _dwWB["GABKG"].ToString().Trim() + _dwWB["GABKA"].ToString().Trim() + _dwWB["GABSP"].ToString().Trim())
                    {
                        _dwWB["CHGUSER"] = app.User;
                        _dwWB["CHGDATE"] = DD;
                        UpdateICC_GBMOV(_dwWB, "YGR", 2);
                    }
                }
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
        }
    
        
    }
}
 